import 'package:flutter/material.dart';
import 'package:flutter_application_vscode/list.dart';
import 'my_home_page.dart';
import 'tip_route.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.orange),
      ),
      routes: {
        "tip_page":
            (context) => TipRoute(
              text:
                  ModalRoute.of(context)?.settings.arguments as String? ??
                  "默认提示信息",
            ),
        "list_page": (context) => ListPage(),
        "detail_page": (context) => DetailPage(),
      },
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}
